package org.bspv.pharma.manager.impl;

import java.util.Date;
import java.util.List;

import org.bspv.pharma.dao.CredentialDAO;
import org.bspv.pharma.manager.CredentialManager;
import org.bspv.pharma.model.User;
import org.bspv.pharma.model.security.Credential;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service(value = "credentialManager")
public class CredentialManagerImpl extends
		AbstractManagerImpl<Credential, Long> implements CredentialManager {

	@Autowired
	public CredentialManagerImpl(CredentialDAO dao) {
		super(dao);
	}

	public List<Credential> findValidCredentials(User user, Date date) {
		return ((CredentialDAO) dao).findValidCredentials(user, date);
	}

}
